#include "StdAfx.h"
#include "Circle.h"

IMPLEMENT_SERIAL(Circle, Geometry2D, 0)

Circle::Circle(void)
{
}

Circle::~Circle(void)
{
}

void Circle::Serialize(CArchive& ar)
{
	ptCenter.Serialize(ar);
	if(ar.IsStoring()) ar << nRadius;
	else ar >> nRadius;
}


void Circle::Render(CDC* pDC) const
{
	pDC->MoveTo(CPoint(ptCenter.x + nRadius, ptCenter.y));
	CRect rect(CPoint(ptCenter.x - nRadius, ptCenter.y - nRadius), CPoint(ptCenter.x + nRadius, ptCenter.y + nRadius));
	pDC->ArcTo(rect, CPoint(ptCenter.x + nRadius, ptCenter.y), CPoint(ptCenter.x + nRadius, ptCenter.y));
}
